﻿CREATE TABLE [audit].[AccountMapping] (
    [AccountMappingId]          INT                 NOT NULL,
    [AccountMappingPath]        [sys].[hierarchyid] NOT NULL,
    [AccountMappingAccountName] VARCHAR (100)       NOT NULL,
    [AccountMappingLevel]       INT                 NOT NULL,
    [AccountHierarchyId]        SMALLINT            NOT NULL,
    [AccountId]                 SMALLINT            NOT NULL,
    [AccountMappingAccountType] VARCHAR (5)         NULL,
    [AccountMappingStartDate]   DATE                NOT NULL,
    [AccountMappingEndDate]     DATE                NULL,
    [AuditId]                   INT                 NOT NULL,
    [AuditType]                 CHAR (1)            NOT NULL,
    [IsAuditRowNew]             BIT                 NOT NULL,
    [IsMappingChildUpdate]      BIT                 NOT NULL
);

